#pragma once
#define NULL 0

class Float
{
private:
	double *data;
public:
	Float();
	Float(double number);

	operator double();
	Float operator++ ();
	Float operator++ (int);
	Float operator-- ();
	Float operator-- (int);
	void operator+= (double number);
	void operator-= (double number);
	void operator*= (double number);
	void operator/= (double number);

	void free();
};

Float::Float()
{
	this->data = new double;
}

Float::Float(double number)
{
	this->data = new double(number);
}

Float::operator double()
{
	return *this->data;
}

Float Float::operator++ ()
{
	return ++(*this->data);
}

Float Float::operator++ (int)
{
	return (*this->data)++;
}

Float Float::operator-- ()
{
	return --(*this->data);
}

Float Float::operator-- (int)
{
	return (*this->data)--;
}

void Float::operator+= (double number)
{
	*this->data += number;
}

void Float::operator-= (double number)
{
	*this->data -= number;
}

void Float::operator*= (double number)
{
	*this->data *= number;
}

void Float::operator/= (double number)
{
	*this->data /= number;
}

void Float::free()
{
	this->data = new double;
	delete data;
	this->data = NULL;
}